<template>
    <div>
			<router-view></router-view>
       <mt-header fixed title="传智播客"></mt-header>
        
		<nav class="mui-bar mui-bar-tab">
			<router-link class="mui-tab-item" to="/home">
				<span class="mui-icon mui-icon-home"></span>
				<span class="mui-tab-label">首页</span>
			</router-link>
			<router-link class="mui-tab-item" to="/email">
				<span class="mui-icon mui-icon-email"></span>
				<span class="mui-tab-label">会员</span>
			</router-link>
			<router-link class="mui-tab-item" to="/shopCar/car">
				<span class="mui-icon mui-icon-contact"><span class="mui-badge">0</span></span>
				<span class="mui-tab-label">购物车</span>
			</router-link>
			<router-link class="mui-tab-item" to="/set">
				<span class="mui-icon mui-icon-gear"></span>
				<span class="mui-tab-label">搜索</span>
			</router-link>
			<!-- 这里渲染的标签在f12里element里显示的 a还是a -->

		</nav>
    </div>
</template>
<script>
import obj from "./calc.js";
console.log(obj.add(12, 12));
obj.subb(23);
import { Toast } from "mint-ui";
//用于app.vue与goodsinfo之间传值
import {vm,count} from "./kits/vm.js"
vm.$on(count,function(input){
	console.log(input);
	var badge=document.querySelector(".mui-badge");
		badge.innerText=+badge.innerText+input; //对于进行运算的变量首先要考虑它的数据类型
})
export default {
  //前面出现语法错误时，高亮标签也不会高亮
  data() {
    return {
      msg: "hello" //为啥直接打印webpack它不显示，而用install run dev 可以？
    };
  },
  methods: {
    toast() {
      Toast({
        message: "你好"
      });
    }
  }
};
</script>
<style scoped>
	#tmpl{
		margin-top: 40px;
		margin-bottom: 50px;
	}
	.color {
		color: red;
	}
</style>

